#ifndef COMCONFIG_H
#define COMCONFIG_H

#include <QWidget>
#include <QSerialPort>
#include <QSerialPortInfo>
#include "mainwindow.h"
namespace Ui {
class COMconfig;
}

class COMconfig : public QWidget
{
    Q_OBJECT

public:
    explicit COMconfig(QSerialPort *serialPort,QWidget *parent = nullptr);
    ~COMconfig();

private slots:
    void on_btnConnect_clicked();
signals:
    void portConnect();
    void portConnected(const QString &deviceType);

private:
    Ui::COMconfig *ui;
    QSerialPort *serialPort;
    void initUI();
    void initSerialPort();

};

#endif // COMCONFIG_H
